from time import time

from sqlalchemy import Column, Integer, String, Time

from . import Base


class User_config(Base):
    # 数据表名
    __tablename__ = "user_config"

    id = Column(Integer,  primary_key=True)
    user_id = Column(Integer, nullable=False)
    qq = Column(String(10), nullable=False)
    text = Column(String(255), nullable=False)
    wtime = Column(Time, nullable=False)
    address = Column(String(20), nullable=False)
    wstatus = Column(Integer, nullable=False)
    xtime = Column(Time, nullable=False)
    xstatus = Column(Integer, nullable=False)

    __mapper_args__ = {
        "order_by": wtime.asc()
    }